<template>
  <div class="main">
    <div class="tittle">
      <el-row style="width:100%;display: flex;align-items: flex-end;">
        <el-col :span='2'><span><slot name='tittle'></slot></span></el-col>
        <el-col :span='2' :offset='20'><el-link @click="GoMore">更多...</el-link></el-col>
      </el-row>
    </div>
    <div class="content" v-for="(item,index) in List" :key="index">
      <IndustryCradTp :itemList='item'></IndustryCradTp>
    </div>
  </div>
</template>

<script>
import IndustryCradTp from './IndustryCradTp.vue'

export default {
  name: 'IndustryTp',
  components:{
    IndustryCradTp
  },
  props:[
    'dataList',
  ],
  data() {
    return{
      val: 0,
      List: '',
    }
  },
  created() {
    this.val = this.dataList[1]
    this.dataList.pop();
    this.List = this.dataList;
  },
  computed: {
   
  },
  watch: {
  
  },
  methods: {
    GoMore(){
      console.log(this.dataList);
      switch(this.val) {
        case 0:
          this.$parent.GoAll();
          break;
        case 1:
          this.$parent.GoA();
          break;
        case 2:
          this.$parent.GoB();
          break;
        case 3:
          this.$parent.GoC();
          break;
        case 4:
          this.$parent.GoD();
          break;
        case 5:
          this.$parent.GoE();
          break;
      }
    }
  }
}
</script>

<style scoped>
.main{
  width: 1140px;
  margin: auto;
}
.tittle{
  font-size: 22px;
  font-weight: 700;
  padding: 16px;
  border-bottom: 2px solid skyblue;
  display: flex;
}

</style>